<h1>Lista de usuarios</h1>
<br />

<fieldset id="agrupacion">
  <% form_tag url_for(:action=>"update_table"),{:id =>"users_form_search"} do -%>
    <fieldset class="column-left">
      <p class="two-col"><label>Nombre o usuario: </label><%= text_field_tag "user_name" %></p>
      <input class="button" name="Buscar" value="Buscar" type="submit" />
    </fieldset>
    <fieldset class="column-right">
      <p class="two-col"><label>Estado: </label><%= select_tag "user_state", '<option value = "0">Registrado</option><option value = "1">Aprobado</option><option value = "2">Rechazado</option><option value = "3">Suspendido</option>'.html_safe,:include_blank=>"Seleccione" %></p>
      <p class="two-col"><label>Rol: </label><%= select_tag "user_role", options_for_select(@roles.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" %></p>
    </fieldset>
  <% end %>
  <br />
</fieldset>
<div id="users_table">
  <%= render :partial=>"table" %>
</div>

<%=  link_to('Volver', root_path) %>
